package lanou3g.myfirstapp36kr.activity;
import android.content.Intent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import cn.bmob.v3.BmobUser;
import lanou3g.myfirstapp36kr.R;
import lanou3g.myfirstapp36kr.base.BaseActivity;

/**
 * Created by dllo on 16/8/15.
 */
public class SettingActivity extends BaseActivity {
    private Button buttonGoout;
    public static final String GO_OUT = "lanou3g.myfirstapp36kr.activity.GO_OUT";
    private Intent broadcast;
    @Override
    protected int getLayout() {
        return R.layout.activity_setting;
    }

    @Override
    protected void initView() {
        broadcast = new Intent();
        broadcast.setAction(GO_OUT);
        buttonGoout = (Button) findViewById(R.id.go_out);
        findViewById(R.id.iv_findgoodproject_back_setting).setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                finish();
            }
        });

    }

    @Override
    protected void initData() {
        buttonGoout.setOnClickListener(new OnClickListener() {
            @Override
            public void onClick(View view) {
                sendBroadcast(broadcast);

                BmobUser.logOut();
                finish();
            }
        });

    }


}
